package com.neusoft.neuiotms.dcam.fixed.model.spareconsume;

import com.neusoft.bizcore.web.jpa.model.AbstractModel;
import com.neusoft.bizcore.web.jpa.model.Comment;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.hibernate.validator.constraints.Length;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

@Getter
@Setter
@ToString
@Entity
@org.hibernate.annotations.Table(appliesTo = "neuiot_spareconsume_apply_form", comment = "备件领用申请表")
@Table(name = "neuiot_spareconsume_apply_form")
public class SpareConsumeApply extends AbstractModel {
    private static final long serialVersionUID = 1L;

    /** 标题 */
    @Length(max = 255, message = "标题不能超过{max}位")
    @Column(nullable = false)
    @Comment("varchar(255) NOT NULL COMMENT '标题'")
    private String title;

    /** 工作流TaskId */
    @Length(max = 255, message = "工作流TaskId不能超过{max}位")
    @Column(length = 255, nullable = false)
    @Comment("varchar(255) NOT NULL COMMENT '工作流TaskId'")
    private String taskId;

    /** 工单号 */
    @Length(max = 50, message = "工单号不能超过{max}位")
    @Column(length = 50, nullable = false)
    @Comment("varchar(50) NOT NULL COMMENT '工单号'")
    private String workNum;

    /** 工作流TaskId */
    @Length(max = 1000, message = "领用需求不能超过{max}位")
    @Column(length = 1000, nullable = false)
    @Comment("varchar(1000) NOT NULL COMMENT '领用需求'")
    private String requireSpare;

    /** 厅局ID */
    private Long officeId;

    /** 厅局名称 */
    @Length(max = 1000, message = "服务厅局不能超过{max}位")
    @Column(length = 1000, nullable = false)
    @Comment("varchar(1000) NOT NULL COMMENT '服务厅局'")
    private String officeName;

    /** 故障工单ID */
    private Long malfunction;

    /** 故障工单标题 */
    @Length(max = 1000, message = "故障工单不能超过{max}位")
    @Column(length = 1000, nullable = false)
    @Comment("varchar(1000) NOT NULL COMMENT '故障工单'")
    private String malfunctionName;

    /** 领用确认人 */
    private String confirmUser;
}
